home *** CD-ROM | disk | FTP | other *** search
/ Champak 114 / Vol 114.iso / games / spongebo.swf / scripts / frame_15 / DoAction.as
Encoding:
Text File  |  2010-08-12  |  1.1 KB  |  44 lines

  1. _global.app = this;
  2. app.soundVol = 100;
  3. app.myscreenName = "null";
  4. app.basePath = "http://www.nick.com";
  5. app.userPath = "/games/common/user_name/getUserInfo.jhtml";
  6. app.scorePath = "/common/score/Scoreboard.jhtml?msg=Q&game=sb_panic";
  7. loadUser = new LoadVars();
  8. loadUser.load(app.basePath + app.userPath);
  9. loadUser.onLoad = function()
  10. {
  11.    returnLog = loadUser.toString();
  12.    app.rawName = this.screenName;
  13.    index = app.rawName.indexOf("\n");
  14.    trace("index " + index);
  15.    if(index > -1)
  16.    {
  17.       trace("stripping return");
  18.       app.myscreenName = app.rawName.substr(0,index);
  19.    }
  20.    else
  21.    {
  22.       trace("no return to strip....");
  23.       app.myscreenName = app.rawName;
  24.    }
  25.    if(app.myscreenName == "null")
  26.    {
  27.       trace("null returned");
  28.    }
  29.    else if(app.myscreenName == "undefined")
  30.    {
  31.       trace("undefined returned");
  32.       app.myscreenName = "null";
  33.    }
  34.    else if(app.myscreenName == "")
  35.    {
  36.       trace("blank val returned");
  37.       app.myscreenName = "null";
  38.    }
  39.    else if(app.myscreenName == null)
  40.    {
  41.       trace("actual null returned");
  42.    }
  43. };
  44.